home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
BSPROTO.H
< prev
next >
Wrap
Text File
|
1995-08-23
|
22KB
|
868 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: bsproto.h
// Title: Base library
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
//
// This module contains prototypes and other information for files included
// in the base library.
//
// The code in this module should be written entirely in C.
// Do not use any C++ constructs.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
// SCO UNIX.
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
// SCO UNIX cc
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Windows NT
// Some Windows NT API names conflict with base library function names.
// For example: Sleep()
// These macros redefine some of these names so that they don't conflict.
//----------------------------------------------------------------------------
#if OS_NT
#define Sleep BaseSleep
#endif
//----------------------------------------------------------------------------
// Prototypes
//----------------------------------------------------------------------------
//
// bsassert.c
//
#if COMPILE_DEBUG
# define Assert(exp) ((exp) ? (void)0 : \
((void)DebugSetLocation(__FILE__,__LINE__),\
(void)Assert_Debug(#exp)))
#else
# define Assert(exp)
#endif
BOOL FN_E Assert_Debug(PCSZ);
//
// bsbcd.c
//
VOID FN_E stra2b(PBYTE, SIZET, PCCHAR, SIZET);
VOID FN_E strb2a(PCBYTE, SIZET, PCHAR, SIZET, BOOL);
//
// bsboot.c
//
VOID FN_E Boot(BOOL);
//
// bscfg.c
//
#define MAX_CFG_NAME (227) // Maximum configuration file name size
BOOL FN_E CfgClose(void);
BOOL FN_E CfgDelete(PCSZ);
BOOL FN_E CfgFind(PCSZ);
BOOL FN_E CfgFindClose(void);
BOOL FN_E CfgFindFirst(PSZ);
BOOL FN_E CfgFindNext(PSZ);
BOOL FN_E CfgOpen(PCSZ);
BOOL FN_E CfgRead(PCSZ, PBYTE _FAR_ *, PSIZET);
VOID FN_E CfgSetCache(SIZET);
BOOL FN_E CfgWrite(PCSZ, PBYTE, SIZET);
//
// bscmdlin.c
//
#define CMDOPT_SWITCH (0x0000) // A simple switch (/T)
#define CMDOPT_BOOL (0x0100) // Boolean, no default (/T+, /T-)
#define CMDOPT_TRUE (0x1100) // Boolean, default true (/T, /T+, /T-)
#define CMDOPT_FALSE (0x2100) // Boolean, default false (/T, /T+, /T-)
#define CMDOPT_NUMERIC (0x0200) // Numeric (/T=500)
// Text (/T:"TEXT")
#define _CMDOPT_TEXT (0x0400)
#define CMDOPT_TEXT(x) (_CMDOPT_TEXT+((x) & 0x00FF))
// File specification (non-switch)
#define _CMDOPT_FILESPEC (0x0800)
#define CMDOPT_FILESPEC(x) (_CMDOPT_FILESPEC+((x) & 0x00FF))
#define CMDOPT_REQUIRED (0x1000) // File name required!
#define CMDOPT_FILESPECR(x)(CMDOPT_FILESPEC(x)|CMDOPT_REQUIRED)
#define CMDOPT_REQUIRED (0x1000) // File name required!
#define CMDOPT_USED (0x2000) // Option found on command line
#define CMDOPT_NO_DFT (0x4000) // Don't display default parameter value
#define CMDOPT_CASE (0x8000) // Case sensitive
#define CMDOPT_NO_CASE (0x0000) // Case insensitive
#define _CMDOPT_SIZE (0x00FF) // Buffer size mask
// Lower byte is maximum length
///// Processing flags!
#define CMDOPT_NO_ERR (0x0001) // Ignore all processing errors
typedef struct _BS_CMDOPT // Command line option structure
{ // See bscmdlin.c
PSZ psz; // Option name
PVOID pv; // Option value.
FLAG16 fs; // Option flags
PSZ pszDesc; // Option description
} BS_CMDOPT;
BASETYPE(BS_CMDOPT);
#define BS_CMDOPT_NULL { NULL, NULL, 0, NULL }
PSZ FN_E CommandLineAppName(void);
PSZ FN_E CommandLineAppPath(void);
BOOL FN_E CommandLineProcess(PBS_CMDOPT, FLAG16 DFTPARM(0));
//
// bscprite.c
//
typedef enum _CFG_PARM
{
CFG_COPYRIGHT = 0,
CFG_VERSION,
CFG_SERIAL_NO,
CFG_PROGRAM_ID,
CFG_PROGRAM_NAME,
CFG_ACCESS,
CFG_REGISTER,
CFG_MAX,
CFG_ALL, // Set all parameters
CFG_CLEAR, // Clear structure
} CFG_PARM;
typedef struct _BS_CFG
{
CHAR szLocater[10+1]; // Locater string
CHAR chGarble; // If structure garbled?
CHAR szCopyright[80+1]; // Copyright notice
CHAR szVersion[20+1]; // Program version string
CHAR szSerialNo[8+1]; // Program serial #
CHAR szProgramId[8+1]; // Program identification string
CHAR szProgramName[80+1]; // Program name
CHAR szAccess[8+1]; // Program access code
CHAR szRegister[80+1]; // Registered to
} BS_CFG;
BASETYPE(BS_CFG);
VOID FN_E CfgGarble(PBS_CFG);
PCSZ FN_E CfgGet(CFG_PARM, PBS_CFG DFTPARM(NULL));
BOOL FN_E CfgSet(PCSZ, CFG_PARM, PBS_CFG DFTPARM(NULL));
//
// bscpu.c
//
SIZET FN_E Cpu(void);
PCSZ FN_E CpuName(void);
//
// bscrc.c
//
CRC FN_E CrcCalc(PCBYTE, SIZET);
CRC FN_E CrcCalcAppend(PCBYTE, SIZET, CRC);
BOOL FN_E CrcFile(PCSZ, PCRC);
CRC FN_E CrcCalcStr(PCSZ);
//
// bscrierr.c
//
USHORT FN_E CritErr(void);
VOID FN_E CritErrReset(void);
//
// bscrisec.c
//
VOID FN_E CritSecEnter(void);
VOID FN_E CritSecExit(void);
//
// bsdebug.c
//
BOOL FN_E DebugSetLocation(PSZ, SIZET);
BOOL FN_E DebugMode(void);
//
// bsdisp.c
//
BOOL FN_E DisplayIsVGA(void);
//
// bsdrive.c
//
enum DRIVE_TYPE
{
DRV_360 = 0,
DRV_FIRST = DRV_360,
DRV_12,
DRV_720,
DRV_8_SD,
DRV_8_DD,
DRV_FIXED,
DRV_TAPE,
DRV_144,
DRV_OTHER,
DRV_LAST = DRV_OTHER,
DRV_MAX
};
SHORT FN_E DriveGet(void);
BOOL FN_E DriveIsRemote(SHORT);
BOOL FN_E DriveIsValid(SHORT, PSHORT);
BOOL FN_E DriveSet(SHORT);
SHORT FN_E DriveSize(SHORT, PLONG, PLONG);
SHORT FN_E DriveType(SHORT);
//
// bsebcdic.c
//
PSZ FN_E stra2e(PSZ);
PSZ FN_E stre2a(PSZ);
//
// bsenv.c
//
BOOL FN_E EnvCheck(PCSZ, PCSZ);
PCSZ FN_E EnvGet(PCSZ);
LONG FN_E EnvVal(PCSZ);
//
// bserror.c
//
#define Error DebugSetLocation(__FILE__,__LINE__),\
Error_Debug
#define _Error DebugSetLocation(__FILE__,__LINE__),\
::Error_Debug
#define ErrorNoMem() ErrorNoMem_Debug(__FILE__,__LINE__)
#define _ErrorNoMem() ::ErrorNoMem_Debug(__FILE__,__LINE__)
#define ErrorV(x,y) DebugSetLocation(__FILE__,__LINE__),\
ErrorV_Debug((x),(y))
#define Fatal DebugSetLocation(__FILE__,__LINE__),\
Fatal_Debug
#define Invalid DebugSetLocation(__FILE__,__LINE__),\
Invalid_Debug
#define NotImplemented DebugSetLocation(__FILE__,__LINE__),\
NotImplemented_Debug
typedef SHORT (FN_E *PFNERR)(PCSZ);
BOOL FN_EV Error_Debug(PCSZ, ...);
BOOL FN_EV ErrorNoMem_Debug(PCSZ, SIZET);
BOOL FN_E ErrorSetDisplay(PFNERR);
BOOL FN_E ErrorV_Debug(PCSZ, va_list);
BOOL FN_EV Fatal_Debug(PCSZ, ...);
BOOL FN_E Invalid_Debug(PCSZ);
BOOL FN_E NotImplemented_Debug(PCSZ);
//
// bsfcopy.c
//
#define FCOPY_NO_NEWER (0x0001) // Don't overwrite newer files
#define FCOPY_BACKUP (0x0002) // Create backup
#define FCOPY_NO_DATE (0x0004) // Don't preserve date.
#define FCOPY_NO_OVERWRITE (0x0008) // Don't overwrite existing.
#define FCOPY_APPEND (0x0010) // Append to existing
#define FCOPY_RW (0x0020) // Clear read-only (CD always has readonly)
#define FCOPY_NEWER_EXISTS (0x0001)
#define FCOPY_BACKUP_CREATED (0x0002)
#define FCOPY_DST_EXISTS (0x0004)
#define FCOPY_FILE_COPIED (0x0008)
BOOL FN_E CopyFile(PCSZ, PCSZ, FLAG16, PUSHORT);
//
// bsfile.c
//
typedef LONG FPOS; // fpos; File position
BASETYPE(FPOS);
#if OS_OS2 || OS_UNIX
typedef LONG HF; // hf; Handle, File
#else
typedef SHORT HF; // hf; Handle, File
#endif
BASETYPE(HF);
enum _FILE_SEEK
{
FL_BEGIN = 0x0000, // Seek from beginning
FL_CURRENT = 0x0001, // Seek from current
FL_END = 0x0002, // Seek from end
};
///// Open modes
#define FL_OPEN (0x00000001L) // Open file, fail if exists
#define FL_TRUNCATE (0x00000002L) // Open file, truncate if exists
#define FL_CREATE (0x00000004L) // Open file, create if doesn't exist
#define FL_OPEN_MODE (0x0000000FL) // Open mode mask
///// Read/write modes
#define FL_READONLY (0x00000010L) // Read only
#define FL_WRITEONLY (0x00000020L) // Write only
#define FL_READWRITE (0x00000040L) // Read and write
#define FL_RW_MODE (0x000000F0L) // Read/write mode mask
///// Sharing modes
#define FL_DENYREADWRITE (0x00000100L) // Deny read and write
#define FL_DENYWRITE (0x00000200L) // Deny write
#define FL_DENYREAD (0x00000400L) // Deny read
#define FL_DENYNONE (0x00000800L) // Deny none
#define FL_SH_MODE (0x00000F00L) // Share mode mask
///// Text/binary mode
#define FL_TEXT (0x00001000L) // Open in text mode
#define FL_BINARY (0x00002000L) // Open in binary mode (Default)
#define FL_TEXT_MODE (0x0000F000L) // Text/binary mode mask
///// Flags
#define FL_BUFFERED (0x00010000L) // Open file for buffered i/o (read-only?)
#define FL_IGNORE_CASE (0x00020000L) // Tokenizer should ignore case
#define FL_TOKEN (0x00040000L) // Open for tokenizing (implies buffered)
#define FL_APPEND (0x00080000L) // Append to file
#define FL_FLAGS (0x000F0000L) // Flags mask
#define FL_ALL (0x000FFFFFL) // All flags
///// Compisite open modes
#define FL_O_TOKEN (0x02000000L) // Open for tokenizing
#define FL_O_RT (0x04000000L) // Open for text read
#define FL_O_WT (0x08000000L) // Open for text write
#define FL_O_AT (0x10000000L) // Open for text appending
#define FL_O_R (0x20000000L) // Open for binary read
#define FL_O_RW (0x40000000L) // Open for binary read/write
#define FL_O_T (0x80000000L) // Truncate and open for read/write
enum _FL_OPENACTION
{
FL_FAILED = 0x0001, // Open failed
FL_TRUNCATED = 0x0002, // File was truncated
FL_EXISTED = 0x0004, // File existed
FL_CREATED = 0x0008, // File was created
};
BOOL FN_E FileClose(HF);
BOOL FN_E FileCloseAll(void);
BOOL FN_EV FileError(HF, PCSZ, ...);
BOOL FN_E FileErrorV(HF, PCSZ, va_list);
BOOL FN_E FileFill(HF, FPOS, FPOS, BYTE);
BOOL FN_E FileFlush(HF);
FPOS FN_E FileGetPos(HF);
FPOS FN_E FileGetSize(HF);
BOOL FN_E FileIsError(HF);
BOOL FN_E FileIsRedirected(void);
BOOL FN_E FileLock(HF, FPOS, FPOS);
BOOL FN_E FileOpen(PHF, PCSZ, FLAG32, PFLAG16 DFTPARM(NULL));
BOOL FN_E FileRead(HF, PVOID, SIZET, FPOS DFTPARM(-1L));
BOOL FN_E FileSetMaxHandles(SHORT);
BOOL FN_E FileSetNoinherit(void);
BOOL FN_E FileSetPos(HF, FPOS, USHORT);
BOOL FN_E FileSetSize(HF, FPOS);
BOOL FN_E FileUnlock(HF, FPOS, FPOS);
BOOL FN_E FileWrite(HF, PCVOID, SIZET, FPOS DFTPARM(-1L));
//
// bsfile1.c
//
BOOL FN_E FileCopy(HF, FPOS, HF, FPOS DFTPARM(-1L), FPOS DFTPARM(-1L));
BOOL FN_E FileCrc(HF, PCRC, FPOS DFTPARM(-1L), FPOS DFTPARM(-1L));
BOOL FN_E FileGarble(HF, PCSZ, FPOS DFTPARM(-1L), FPOS DFTPARM(-1L));
//
// bsfile2.c
//
ULONG FN_E FileLine(HF);
PCSZ FN_E FileName(HF);
BOOL FN_E FileReadStr(HF, PCHAR, SIZET);
//
// bsfile3.c
// Text output
//
BOOL FN_E FileWrapStr(HF, PCSZ, SIZET);
BOOL FN_E FileWriteStr(HF, PCSZ);
BOOL FN_EV FileWriteStrf(HF, PCSZ, ...);
BOOL FN_E FileWriteStrq(HF, PCSZ);
//
// bsfile4.c
// Tokenizer
//
typedef enum
{
/* Token generated by tokenizer */
/* 0*/ TOK_ERROR = 0, // Token is error
/* 1*/ TOK_KEYWORD, // Token is a key word
/* 2*/ TOK_OPERATOR, // Token is an operator
/* 3*/ TOK_IDENTIFIER, // Token is an identifier (text, but no keyword)
/* 4*/ TOK_INTEGER, // Token is a long integer. Integer is always
// positive. Unary minus is handled by parser.
/* 5*/ TOK_WHITESPACE, // Token is white space
/* 6*/ TOK_SOL, // Start of line
/* 7*/ TOK_EOL, // End of line
/* 8*/ TOK_SOF, // Start of file
/* 9*/ TOK_EOF, // End of file
/*10*/ TOK_SSTRING, // Single quoted string
/*11*/ TOK_DSTRING, // Double quoted string
/*12*/ TOK_MAX,
} TOKEN;
BASETYPE(TOKEN);
BOOL FN_E FileTokenClearEol(HF);
SHORT FN_E FileTokenKeyword(HF);
TOKEN FN_E FileTokenNext(HF);
TOKEN FN_E FileTokenNextLine(HF, SHORT);
TOKEN FN_E FileTokenNextNonSpace(HF, SHORT);
BOOL FN_E FileTokenOpen(PHF, PCSZ, FLAG32, PPSZ, PPSZ);
SHORT FN_E FileTokenOperator(HF);
PCSZ FN_E FileTokenText(HF);
TOKEN FN_E FileTokenType(HF);
LONG FN_E FileTokenValue(HF);
//
// bsfinfo.c
//
typedef struct _BS_FINFO
{
#if OS_OS2
CHAR szFname[256]; // File name
#else
CHAR szFname[13];
#endif
USHORT usAttrib; // File attributes
LONG lSize; // File size
TIMET timet; // Time last modified
} BS_FINFO;
BASETYPE(BS_FINFO);
BOOL FN_E FinfoFindClose(PVOID);
PVOID FN_E FinfoFindFirst(PCSZ, USHORT, PBS_FINFO);
BOOL FN_E FinfoFindNext(PVOID, PBS_FINFO);
BOOL FN_E FinfoGet(PCSZ, PBS_FINFO);
BOOL FN_E FinfoSet(PCSZ, PBS_FINFO);
//
// bsfname
//
enum FNAME_SEPARATOR
{
FNAME_CHECK, // Check if separator exists
FNAME_ADD, // Add separator
FNAME_DELETE, // Delete separator
FNAME_DIR // Directory separator format
};
enum FNAME_QUALIFY
{
FNAME_NO_CREATE = 0x0001, // Don't create name
FNAME_CUR_DIR = 0x0002, // Create in current directory
FNAME_APP_DIR = 0x0004, // Create in application directory
};
BOOL FN_E FnameAppendExt(PSZ, PCSZ, BOOL);
BOOL FN_E FnameDelete(PCSZ);
BOOL FN_E FnameDeleteFileSpec(PCSZ);
BOOL FN_E FnameExists(PCSZ);
BOOL FN_E FnameFullPath(PSZ);
BOOL FN_E FnameGetDrivePath(PSZ, SHORT);
BOOL FN_E FnameGetPath(PSZ, SHORT);
BOOL FN_E FnameIsDirectory(PCSZ);
BOOL FN_E FnameIsFile(PCSZ);
BOOL FN_E FnameIsRoot(PCSZ);
BOOL FN_E FnameIsWriteable(PCSZ);
BOOL FN_E FnameMakeDir(PCSZ);
BOOL FN_E FnameMakePath(PSZ, PCSZ, PCSZ, PCSZ, PCSZ);
BOOL FN_E FnameNormalize(PSZ, USHORT);
BOOL FN_E FnameQualify(PSZ, PCSZ, PCSZ, USHORT);
BOOL FN_E FnameRemoveDir(PCSZ);
BOOL FN_E FnameRename(PCSZ, PCSZ);
BOOL FN_E FnameSeparator(PSZ, USHORT);
BOOL FN_E FnameSetPath(PCSZ);
BOOL FN_E FnameSplitPath(PCSZ,PSZ,PSZ,PSZ,PSZ,PSZ);
BOOL FN_E FnameTempFile(PSZ, PCSZ, PCSZ, PCSZ);
PSZ FN_E FnameTempName(PSZ, PCSZ);
//
// bsgarble.c
//
VOID FN_E Garble(PBYTE, SIZET, PBYTE, SIZET);
BOOL FN_E GarbleFile(PCSZ, PCSZ);
VOID FN_E GarbleStr(PSZ, PCSZ);
//
// bshalt.c
//
#define Halt(x) DebugSetLocation(__FILE__,__LINE__),\
Halt_Debug(x)
BOOL FN_E Halt_Debug(PCSZ);
//
// bsheap.c
//
PVOID FN_E MemAlloc_Debug(PCSZ, SIZET, SIZET);
PVOID FN_E MemAllocZero_Debug(PCSZ, SIZET, SIZET);
PVOID FN_E MemRealloc_Debug(PCSZ, SIZET, SIZET, PVOID);
PCSZ FN_E MemStrDup_Debug(PCSZ, SIZET, PCSZ);
PVOID FN_E MemAlloc(SIZET);
PVOID FN_E MemAllocZero(SIZET);
PVOID FN_E MemRealloc(SIZET, PVOID);
PSZ FN_E MemStrDup(PCSZ);
#if COMPILE_DEBUG
#define MemAlloc(x) MemAlloc_Debug(__FILE__,__LINE__,(x))
#define MemAllocZero(x) MemAllocZero_Debug(__FILE__,__LINE__,(x))
#define MemRealloc(x,y) MemRealloc_Debug(__FILE__,__LINE__,(x),(y))
#define MemStrDup(x) MemStrDup_Debug(__FILE__,__LINE__,(x))
#endif
PVOID FN_E MemFree(PVOID);
BOOL FN_E MemIsLowMemory(void);
//
// bsinit.c
//
typedef VOID (FN_E *PFNEXIT)(void);
BOOL FN_E BaseExitFunc(PFNEXIT, SIZET DFTPARM(0));
#if OS_WINDOWS
VOID FN_E BaseLibraryInitialize(HINSTANCE, HINSTANCE, LPSTR, int, PBS_CFG);
HINSTANCE FN_E WindowsInstance(void);
HWND FN_E WindowsMainWindow(void);
VOID FN_E WindowsSetMainWindow(HWND);
#else
VOID FN_E BaseLibraryInitialize(int, char **, PBS_CFG);
#endif
VOID FN_E BaseLibraryTerminate(void);
//
// bsio.c
//
BOOL FN_E Input(PSZ, SIZET);
VOID FN_EV Output(PCSZ, ...);
VOID FN_E OutputDisable(BOOL);
VOID FN_EV OutputL(SIZET, PCSZ, ...);
BOOL FN_E OutputRunLog(void);
BOOL FN_E OutputScreen(void);
VOID FN_E OutputV(PCSZ, va_list);
VOID FN_E OutputZ(PCSZ);
//
// bskbd.c
//
INT FN_EA KbdChar(void);
VOID FN_E KbdFlush(void);
BOOL FN_E KbdIsInsert(void);
INT FN_EA KbdReady(void);
USHORT FN_EA KbdState(void);
//
// bslev.c
//
#define MAX_LEV_DISTANCE (100)
SHORT FN_E Levenstein(PCSZ, PCSZ);
//
// bslog.c
//
#define Log DebugSetLocation(__FILE__,__LINE__),\
Log_Debug
BOOL FN_EV Log_Debug(USHORT, PCSZ pcsz, ...);
BOOL FN_E LogEnabled(void);
USHORT FN_E LogGetLevel(void);
VOID FN_E LogSetLevel(USHORT usNewLevel);
BOOL FN_E LogTruncate(void);
//
// bsmem.c
//
PVOID FN_E memdel(PVOID, SIZET, SIZET, SIZET);
PVOID FN_E memins(PVOID, SIZET, PVOID, SIZET, SIZET);
PUSHORT FN_EA memsetw(PUSHORT, USHORT, SIZET);
//
// bsmeta.c
//
#define MAX_PHONETIC (20) // Maximum length of phonetic in bytes!
VOID FN_E AlNumKey(PCSZ, PBYTE, SIZET);
VOID FN_E Metaphone(PCSZ, PBYTE, SIZET);
//
// bsmscdex.c
//
BOOL FN_E MscdexFirstDrive(PSHORT);
BOOL FN_E MscdexIsCdrom(SHORT);
BOOL FN_E MscdexIsInstalled(void);
//
// bspasswd.c
//
ULONG FN_E PasswordGet(PCSZ, PCSZ);
BOOL FN_E PasswordVerify(PCSZ, PCSZ, ULONG);
//
// bspid.c
//
PID FN_E Pid(void);
//
// bsprgman.c
//
BOOL FN_E ProgManClose(void);
BOOL FN_E ProgManCreateGroup(PCSZ, PCSZ);
BOOL FN_E ProgManCreateItem(PCSZ, PCSZ, PCSZ);
BOOL FN_E ProgManOpen(void);
//
// bsprint.c
//
//
// Printer callback function.
// Parameter is a printer error code (currently undefined).
// Returns TRUE to continue printing or FALSE to abort.
//
#define PRT_LPT1 (0x0000) // Print to LPT1 (DOS only)
#define PRT_LPT2 (0x0001) // Print to LPT2 (DOS only)
#define PRT_LPT3 (0x0002) // Print to LPT3 (DOS only)
#define PRT_LPT4 (0x0004) // Print to LPT4 (DOS only)
#define PRT_DELETE_SPOOL (0x0010) // Delete spool file on success
#define PRT_ESCAPE (0x1B) // Printer escape code
typedef BOOL (FN_E *PFNPRINT)(SHORT);
BOOL FN_E PrintFile(PCSZ, FLAG16, PFNPRINT, PCSZ);
#if OS_DOS
#define PRT_ERR_TIME_OUT (0x0001)
#define PRT_ERR_IO (0x0008)
#define PRT_ERR_NOT_SELECTED (0x0010)
#define PRT_ERR_OUT_OF_PAPER (0x0020)
#define PRT_ERR_NO_ACK (0x0040)
#define PRT_ERR_BUSY (0x0080)
#define PRT_ERR_FILE_ERR (0x8000)
USHORT FN_E DosPrintLine(PCSZ, USHORT);
#endif
//
// bsprtscr.c
//
VOID FN_E PrintScreen(BOOL);
//
// bspsize.c
//
VOID FN_E ProgramSize(PLONG, PLONG);
VOID FN_E ProgramSizeShow(PCSZ);
//
// bsquery.c
//
VOID FN_E QueryGenerate(PSZ);
VOID FN_E QueryResponse(PSZ, PCSZ);
BOOL FN_E QueryVerify(PCSZ, PCSZ, PCSZ);
//
// bsrandom.c
//
SIZET FN_E Random(SIZET, SIZET);
//
// bsrev.c
//
PSZ FN_E Revision(PSZ);
//
// bssleep.c
//
VOID FN_E Sleep(ULONG);
//
// bssound.c
//
BOOL FN_E Sound(BOOL);
VOID FN_E SoundBeep(void);
VOID FN_EA SoundNote(USHORT, USHORT);
VOID FN_E SoundPlay(PUSHORT);
//
// bsstr.c
//
PPSZ FN_E str2array(PSZ, PPSZ, SIZET);
PSZ FN_E strarray2str(PPSZ, SIZET, PSZ);
SIZET FN_E strarraycnt(PPSZ);
PCSZ FN_E strarrayfind(PSZ, PPSZ, SIZET);
SIZET FN_E strarraysize(PCSZ);
BOOL FN_E strarraysort(PPSZ, SIZET);
PSZ FN_E strcats(PSZ, PCSZ);
SIZET FN_E strcnt(PSZ, CHAR);
PSZ FN_E strdel(PSZ, SIZET, SIZET);
BOOL FN_E strextract(PSZ, PCSZ, SIZET, PCSZ);
ULONG FN_E strhash(PCSZ);
PSZ FN_E strins(PSZ, PSZ, SIZET);
PSZ FN_E strinsc(PSZ, CHAR, SIZET);
PSZ FN_E strnzcpy(PSZ, PCSZ, SIZET);
PSZ FN_E strord(LONG);
PSZ FN_E strskip2ws(PSZ);
PSZ FN_E strskipws(PCSZ);
PSZ FN_E strskipzero(PCSZ);
PSZ FN_E strstripcntrl(PSZ);
PSZ FN_E strtrim(PSZ);
PSZ FN_E strtrimleft(PSZ);
PSZ FN_E strtrimright(PSZ);
//
// bsstr1.c
//
BOOL FN_E strvaliddouble(PSZ, PDOUBLE);
//
// bsstr2.c
//
BOOL FN_E strisnumeric(PCSZ);
BOOL FN_E strisnumeric2(PCSZ);
BOOL FN_E strisphone(PCSZ);
BOOL FN_E strisvalid(PCSZ, PCSZ);
BOOL FN_E strvalidlong(PCSZ, PLONG);
BOOL FN_E strvalidshort(PCSZ, PSHORT);
BOOL FN_E strvalidulong(PCSZ, PULONG);
BOOL FN_E strvalidushort(PCSZ, PUSHORT);
//
// bsswap.c
//
VOID FN_E Swapping(void);
//
// bsthread.c
//
#if (OS_OS2 || OS_PM) && COMPILE_MT
# define THREADID ((TID)_threadid)
#else
# define THREADID ((TID)1)
#endif
#define ThreadEnd() __ThreadEnd(); return ;
VOID FN_E __ThreadEnd(void);
TID FN_E ThreadId(void);
BOOL FN_E ThreadStart(PFNTHRD, PTID, PVOID);
//
// bstitle.c
//
VOID FN_E BaseTitle(PSZ, PCSZ, PCSZ, PCSZ);
BOOL FN_E BaseTitleHelp(PBS_CMDOPT, PCSZ DFTPARM(NULL), FLAG16 DFTPARM(0));
//
// bsumb.c
//
SHORT FN_E UmbGetState(void);
VOID FN_E UmbSetState(SHORT);
//
// bsunix.c
//
#if OS_UNIX
int memcmp(const void *__s1, const void *__s2, size_t __n);
int stricmp(const char *, const char *);
char *strlwr(char *);
int strnicmp(const char *, const char *, size_t);
char *strupr(char *);
//
// Functions which SCO does not declare but supports anyway...
//
int atexit(void (*__func)(void));
void _exit(int);
int _filbuf(FILE *);
int getpid(void);
int open(const char *, int,...);
int rmdir(const char *);
int unlink(char *);
#endif
//
// bsver.c
//
PCSZ FN_E Version(PUSHORT, PUSHORT);
//
// bsvollbl.c
//
BOOL FN_E VolumeLabel(SHORT, PSZ);
//
// bswrap.c
//
BOOL FN_E strwrap(PCSZ _FAR_ *, SIZET, PSZ DFTPARM(NULL), BOOL DFTPARM(FALSE));
SIZET FN_E strwrapcount(PCSZ, SIZET);
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------